package com.example.kotlintest.net

import com.example.kotlintest.bean.TouTiaoData
import com.example.kotlintest.bean.WeatherData
import retrofit2.http.GET
import retrofit2.http.Query

interface ApiService {

    @GET("weather/index")
    suspend fun weatherInfo(
        @Query("cityname") cityname: String,
        @Query("key") key: String
    ): WeatherData

    @GET("toutiao/index")
    suspend fun toutiaoInfo(
        @Query("page") page: Int,
        @Query("page_size") page_size: Int,
        @Query("key") key: String
    ): TouTiaoData
}